package com.example.demo.common.enums;

/**
 * 企业营业执照上的企业类型
 */
public enum RejectReasonEnum {
    WISH_VIDEO_INVALID("4","意愿视频无效"),
    AGREEMENT_INVALID("3","协议无效"),
    VIDEO_AGREEMENT_INVALID("7","意愿视频和协议无效");
    private String code;    //代码
    private String msg;    //描述

    RejectReasonEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static RejectReasonEnum getRejectReasonEnum(String code) {
        for (RejectReasonEnum j : RejectReasonEnum.values()) {
            if (j.getCode().equals(code)) {
                return j;
            }
        }
        return null;
    }


    public boolean toEquals(Object code) {
        if (code == null) {
            return false;
        }
        String temp = String.valueOf(code);
        return this.code.equals(temp) ;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
